import 'package:flutter/material.dart';
import 'demo/home_demo.dart';
import 'demo/NavigationDemo.dart';
import 'demo/form_demo.dart';
import 'demo/material_components.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'demo/intlDmeo.dart';



void main(){
  runApp(App());
}
class App extends StatelessWidget{
  @override
  Widget build(BuildContext context){ 
     return MaterialApp(
       localeResolutionCallback: (Locale locale,Iterable<Locale> supportedLocales){
         return Locale('en','US');
       },
       localizationsDelegates: [
         NinghaoDemoLocalizationsDelegate(),
         GlobalMaterialLocalizations.delegate,
         GlobalWidgetsLocalizations.delegate
       ],
       supportedLocales: [
         Locale('en','US'),
         Locale('zh','CN')
       ],
    
        debugShowCheckedModeBanner: false,
        initialRoute: '/mdc',
        routes: {
          '/':(context) => Home(),
          '/about':(context) => NavtiongateDemoPage(title: 'About',) ,
          '/form' :(context) => FormDemo(),
          '/mdc' :(context) => MaterialComponentsDemo()
        },
        //home: Home(),
        theme: ThemeData(
          primarySwatch:Colors.green,
          highlightColor:Color.fromRGBO(255,255,255,0.5),
          splashColor: Colors.white70,
          accentColor: Colors.blue,
        ),
       );
  }
}
